#define _CRT_SECURE_NO_WARNINGS

#include"SList.h"

void SListTest()
{
	SListNode* list = NULL;
	SListPushBack(&list, 1);
	SListPushBack(&list, 2);
	SListPushBack(&list, 3);
	SListPushBack(&list, 4);
	SListPushBack(&list, 5);

	SListPushFront(&list, 7);
	SListPushFront(&list, 8);
	SListPushFront(&list, 9);
	SListPushFront(&list, 5);
	SListPushFront(&list, 3);

	/*SListPopBack(&list);
	SListPopBack(&list);
	SListPopBack(&list);
	SListPopBack(&list);
	SListPopBack(&list);

	SListPopFront(&list);
	SListPopFront(&list);
	SListPopFront(&list);*/

	SListNode* node1 = SListFind(list, 2);
	printf("%d\n", node1->data);

	SListInsertAfter(node1, 3);
	SListInsertAfter(node1, 2);
	SListInsertAfter(node1, 6);

	SListEraseAfter(node1);
	SListEraseAfter(node1);
	SListEraseAfter(node1);
	SListEraseAfter(node1);
	SListEraseAfter(node1);
	
	SListPrint(list);

	SListDestroy(list);
	list = NULL;
}


int main()
{
	SListTest();

	return 0;
}